<h2>编辑 <%= resource_name.to_s.humanize %></h2>

<%= form_for(resource, as: resource_name, url: registration_path(resource_name), html: { method: :put }) do |f| %>
  <%= devise_error_messages! %>

  <div><%= f.label :email %><br />
  <%= f.email_field :email %></div>

  <div><%= f.label :name %><br />
    <%= f.text_field :name %></div>

  <div><%= f.label :password %> <i>(留空表示不修改密码)</i><br />
  <%= f.password_field :password %></div>

  <div><%= f.label :password_confirmation %><br />
  <%= f.password_field :password_confirmation %></div>

  <div><%= f.label :current_password %> <i>(需要输入当前密码确认修改操作)</i><br />
  <%= f.password_field :current_password %></div>

<div><%= f.submit "更新", class: "input_button" %></div>
<% end %>

<h3>取消账号</h3>

<p>不开心？<%= link_to "取消账号", registration_path(resource_name), data: { confirm: "确定要继续么？" }, method: :delete %>.</p>

<%= link_to "返回", :back %>
